#include "CreateWindow.h"

CreateWindow::CreateWindow(void)
{
}

CreateWindow::~CreateWindow(void)
{
	SDL_FreeSurface(screen);
	SDL_Quit();
}

void CreateWindow::run()
{
	const int WINDOW_WIDTH = 800;
	const int WINDOW_HEIGHT = 600;
	const char* WINDOW_TITLE = "Sample Window";

	SDL_Init( SDL_INIT_VIDEO );

	screen = SDL_SetVideoMode( WINDOW_WIDTH, WINDOW_HEIGHT, 0, 
      SDL_HWSURFACE | SDL_DOUBLEBUF );
	SDL_WM_SetCaption( WINDOW_TITLE, 0 );

	SDLSample::handleEvents();
}
